<?php
/**
 * Created by JetBrains PhpStorm.
 * User: leon
 * Date: 11/18/12
 * Time: 12:12 PM
 * To change this template use File | Settings | File Templates.

 */

namespace BWL\webshopBundle\Entity;

use Symfony\Component\Security\Core\Role\RoleInterface;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="role")
 */
class Role implements RoleInterface
{
  /**
   * @ORM\Id
   * @ORM\Column(type="string", length=255)
   *
   * @var string $name
   */
  protected $name;

  /**
   * Gets the role name.
   *
   * @return string The name.
   */
  public function getName()
  {
    return $this->name;
  }

  /**
   * Sets the role name.
   *
   * @param string $value The name.
   */
  public function setName($value)
  {
    $this->name = $value;
  }

  /**
   * Implementation of getRole for the RoleInterface.
   *
   * @return string The role.
   */
  public function getRole()
  {
    return $this->getName();
  }
}
